CHARTS
Photo from Wikipedia based on original oil painting by Jerry Barrett
Murder is always a mistake, One should never do anything that one cannot talk about after dinner…
— Oscar Wilde
# Load data
df <- read_csv("archetypes/global-homicide-rates/homicides-falling.csv", col_names=TRUE)
df
theme_opts <- theme(
text = element_text(family = "inconsolata", size = 16),
plot.title = element_text(color = "black", size = 16, face = "bold"),
plot.subtitle = element_text(color = "black", size = 12),
plot.caption = element_text(color = "#555555", size = 10),
axis.text.x = element_text(angle=90, hjust=1, vjust=0.2),
axis.text.y = element_blank(),
axis.ticks.y = element_blank(),
panel.grid.major = element_blank(),
panel.background = element_rect(fill = alpha("#1db4b3", 0.4))
)
v1 <- ggplot(df, aes(x=country, y=change)) +
geom_bar(stat="identity", width=0.6, fill="white", alpha=0.8) +
geom_point(shape=25, fill="white", color="white", alpha=0.7, size=2.1) +
geom_text(aes(y = (change - 0.05), label = paste(change * 100, "%")), hjust = 0.0, angle=90, size=3, family = "inconsolata") +
labs(title="Homicides Are Falling Around the World",
subtitle="% decrease 1995-2015",
caption="Source: World Bank",
x = NULL, y = NULL) +
theme_minimal() +
theme_opts
girafe(ggobj = v1, width_svg = 1280/72, height_svg = 720/72,
options = list(opts_sizing(rescale = TRUE, width = 1.0)))